<!DOCTYPE html>
<html>

	<head>

		<meta name="viewport" content="width=device-width-10, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
		<meta charset="UTF-8">
		<link rel="icon" href="img/favicon.ico">
		<link rel="shortcut icon" href="img/favicon.ico">
		<meta name="keywords" content="简洁，强大的二维码软件,QRTools,QRT,二维码">
		<meta name="description" content="简洁，强大的二维码软件">

		<script type="text/javascript" src="js/jquery-2.1.0.js"></script>
		<script type="text/javascript" src="js/qrcode.js"></script>
		<script type="text/javascript" src="js/qrcode.min.js"></script>
		<link rel="stylesheet" href="css/mdui.css">
		<script src="js/mdui.js"></script>
		<title>QRTools - 生成二维码</title>

	</head>

	<body>

		<!--appbar-->
		<div class="mdui-appbar">
			<div class="mdui-toolbar mdui-color-theme">
				<a href="qr_main.html" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">&#xe5c4;</i></a>
				<a href="javascript:;" class="mdui-typo-headline">二维码生成</a>
				<div class="mdui-toolbar-spacer"></div>
			</div>

		</div>

		<!--主界面-->
		<div class="mdui-card mdui-m-a-2  mdui-p-a-1">
			<div class="mdui-textfield mdui-textfield-floating-label">
				<label class="mdui-textfield-label">请输入文本或链接</label>
				<textarea id="text1" class="mdui-textfield-input" maxlength="1000"></textarea>
			</div>
		</div>

		<div class="mdui-card mdui-m-a-2  mdui-p-a-1">

			<br /><span style="margin: 10px;">快捷操作</span><br />

			<div class="mdui-row-xs-3 mdui-row-sm-4 mdui-row-md-5 mdui-row-lg-6 mdui-row-xl-7 mdui-grid-list mdui-m-t-2">

				<div class="mdui-col">
					<div class="mdui-chip mdui-color-blue-grey">
						<span class="mdui-chip-title">UTF-8编码</span>
					</div>
				</div>

				<div class="mdui-col">
					<div class="mdui-chip mdui-color-blue-grey">
						<span class="mdui-chip-title">base64编码</span>
					</div>
				</div>

				<div class="mdui-col">
					<div class="mdui-chip mdui-color-blue-grey">
						<span class="mdui-chip-title">AES加密</span>
					</div>
				</div>

				<div class="mdui-col">
					<div class="mdui-chip mdui-color-blue-grey">
						<span class="mdui-chip-title">本机IP</span>
					</div>
				</div>

				<div class="mdui-col">
					<div class="mdui-chip mdui-color-blue-grey">
						<span class="mdui-chip-title">转条形码</span>
					</div>
				</div>

			</div>

		</div>

		<div class="mdui-card mdui-m-a-2 mdui-p-a-1 mdui-text-center">
			<img id="img1" style="width: 200px;" src="img/ic_launcher2.png" />

			<!-- 卡片的按钮 -->
			<div class="mdui-card-actions">
				<button class="mdui-btn mdui-ripple mdui-color-blue-grey" onclick="makeCode()">保存二维码</button>
				<button class="mdui-btn mdui-ripple mdui-color-blue-grey" onclick="copytext()">复制文本</button>
			</div>

		</div>

	</body>

	<script type="text/javascript">
		function tip(e) {
			mdui.snackbar({
				message: e,
				position: 'top'
			});
		}


		var text1 = document.getElementById("text1");
		var imgview = document.getElementById("img1");


		function makeCode() {

			if(!text1.value) {
				tip("内容不能为空!");
				return;
			}

		}


		function copytext() {
			var Url2 = document.getElementById("text1");
			Url2.select(); // 选择对象
			document.execCommand("Copy"); // 执行浏览器复制命令
			tip("复制成功!");
		}
	</script>

</html>